package com.shuziren.question.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.yulichang.base.MPJBaseService;
import com.shuziren.abnormal.CustomException;
import com.shuziren.question.entity.ProblemsetTopic;
import com.shuziren.question.entity.dto.InterviewQuestionSetDTO;
import com.shuziren.question.entity.InterviewQuestionSet;
import com.shuziren.question.entity.dto.UpdateInterviewQuestionSet;

import java.util.List;

/**
 * 面试题目集的服务接口
 * @author 123
 */
public interface InterviewQuestionSetService extends MPJBaseService<InterviewQuestionSet> {

    /**
     * 查询题目集下的题目
     * @param id
     * @return
     */
    List<ProblemsetTopic> selectProblemsetTopic(int id);

    /**
     * 添加题目集
     * @param questionSetDTO 题目集信息
     * @return 操作结果
     */
    String addQuestionSet(InterviewQuestionSetDTO questionSetDTO) throws CustomException;

    /**
     * 查询题目集
     * @param querySet
     * @return 返回分页查询结果
     */
    IPage<InterviewQuestionSet> selectQuestionSet(InterviewQuestionSetDTO querySet);

    /**
     * 更新题目集数据不是修改
     * @return int >1更新成功 <1 更新失败没有数据更更改
     * @param id 题目集id
     */
    int dataUpdateQuestionSet(int id) throws CustomException;

    /**
     * 删除题目集
     * @param id
     * @return id >1删除成功 <1 删除失败
     */
    int removeQuestionSet(int id) throws CustomException;

    /**
     * 修改题目集
     * @param id
     * @param questionSet
     * @return
     */
    boolean updateQuestionSet(InterviewQuestionSet questionSet) ;
}